Prompt to add the folder to source path if the running file isn't on classpath#688
Merged
testforstephen merged 3 commits intomasterfrom Oct 14, 2019
Merged
Prompt to add the folder to source path if the running file isn't on classpath#688testforstephen merged 3 commits intomasterfrom
testforstephen merged 3 commits intomasterfrom
Conversation
…classpath Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>
Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>
Eskibear
reviewed
Oct 12, 2019
| if (parentPath === parentUri.fsPath) { | ||
| parentPath = path.basename(parentFsPath); | ||
| } | ||
| const ans = await vscode.window.showWarningMessage(`The file ${fileName} isn't on the classpath, the runtime may throw class not found error. ` |
Contributor
Author
There was a problem hiding this comment.
JDT api called it isOnClasspath, i would keep it consistent.
Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>
Eskibear
approved these changes
Oct 14, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Jinbo Wang jinbwan@microsoft.com
It requires microsoft/java-debug#302
Close #470
When the Java file isn't on the source path of any project, JDT doesn't build it to .class. Run it via codelens or context menu, the runtime will throw class not found error. One improvement is to provide a fix option to ask user to add the parent folder to Java source path.